{*
 * @version    $Id: template.phtml 2 2009-07-13 20:58:52Z david@grudl.com $
 * @param Paginator $paginator
 * @param array     $steps
 *}

{if $paginator->pageCount > 1}
<style>
.paginator {
	margin: 1em 0;
	font-size: 90%;
}

.paginator a, .paginator span {
	margin-right: 0.1em;
	padding: 0.2em 0.5em;
	color: #999999;
}

.paginator a {
	border: 1px solid #9AAFE5;
	text-decoration: none;
	color: #105CB6;
}

.paginator span.button {
	border: 1px solid #DDDDDD;
}

.paginator .current {
	background: #2E6AB1;
	border: 1px solid #2E6AB1;
	color: white;
	font-weight: bold;
}
</style>
<div class="paginator">
	{if $paginator->isFirst()}
	<span class="button">« {_'Previous'}</span>
	{else}
	<a href="{link this, 'page' => $paginator->page - 1}">« {_'Previous'}</a>
	{/if}

	{foreach $steps as $step}
	{if $step == $paginator->page}
		<span class="current">{$step}</span>
	{else}
		<a href="{link this, 'page' => $step}">{$step}</a>
	{/if}
	{if $iterator->nextValue > $step + 1}<span>…</span>{/if}
	{/foreach}

	{if $paginator->isLast()}
	<span class="button">{_'Next'} »</span>
	{else}
	<a href="{link this, 'page' => $paginator->page + 1}">{_'Next'} »</a>
	{/if}
</div>
{/if}
